<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title></title>
		<style>
		</style>
	</head>
	<body>
		<button type="button" id="btn">btn</button>
	</body>
	<script type="text/javascript">
		/**
		 * 点击事件是一个宏任务
		 * 
		 */
		let btn = document.getElementById("btn");
		btn.addEventListener("click", () => {
			console.log("bt1")
			setTimeout(() => {
				console.log("s1")
			}, 0)
		});
		btn.addEventListener("click", () => {
			console.log("bt2")
			Promise.resolve().then(() => {
				console.log("tt")
			})
		});
		Promise.resolve().then(res => {
			console.log(33)
		})
		//33=>bt1=>bt2=>tt=>s1
	</script>
</html>
